﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using DevExpress.Xpf.NavBar;
using BlueMonkey.View;


namespace BlueMonkey
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }
        XTabContainer tabs;
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            View.Logon lo = new Logon();
            lo.ShowDialog();

            BlueCore.MediaObject media = new BlueCore.MediaObject() { Title = "Magi 2 - The Kingdom of Magic - 01", Path = @"C:\Users\Likhit\Downloads\[WindSky-Fs] Magi 2 - The Kingdom of Magic - 01 (TBS 1280x720 x264 AAC).mp4" };

            View.WindowVDO win = new WindowVDO();
            win.Media = media;
            win.Show();

            AddXpender();
        }

        private void AddXpender()
        {
            tabs = new XTabContainer();
            tabs.AddTab(tabs.XTabItem(null, "header0", null));
            
            contentControl1.Content = tabs;
            #region xpender
            Xpender exp = new Xpender();

            XpendeGroup gro = new XpendeGroup("Information");
            ImageSettings imgSetting = new ImageSettings() { Width = 40, Height = 40, Stretch = System.Windows.Media.Stretch.Fill };
            gro.ImageSource = core.wpf.images.BitmapSource(Imagicon.super_mono.information_button);
            gro.ImageSettings = imgSetting;
            gro.Items.Add(new XpenderItem("555 credit", core.wpf.images.BitmapSource(Imagicon.super_mono.credit_cards)));

            XpenderItem item0 = new XpenderItem("hi2!", core.wpf.images.BitmapSource(Imagicon.super_mono.button_play));
            item0.OnClick += new EventHandler(item0_OnClick);
            gro.Items.Add(item0);

            exp.XpenderGroup.Add(gro);

            XpendeGroup gro1 = new XpendeGroup("dont kno1w");
            gro1.ImageSource = core.wpf.images.BitmapSource(Imagicon.super_mono.chart_area_up);
            gro1.ImageSettings = imgSetting;

            gro1.Items.Add(new XpenderItem("good"));
            gro1.Items.Add(new XpenderItem("Camera", core.wpf.images.BitmapSource(Imagicon.super_mono.camera)));
            gro1.Items.Add(new XpenderItem("good"));
            gro1.Items.Add(new XpenderItem("Camera", core.wpf.images.BitmapSource(Imagicon.super_mono.camera)));
            gro1.Items.Add(new XpenderItem("good"));
            gro1.Items.Add(new XpenderItem("Camera", core.wpf.images.BitmapSource(Imagicon.super_mono.camera)));
            gro1.Items.Add(new XpenderItem("good"));
            gro1.Items.Add(new XpenderItem("Camera", core.wpf.images.BitmapSource(Imagicon.super_mono.camera)));
            gro1.Items.Add(new XpenderItem("good"));
            gro1.Items.Add(new XpenderItem("Camera", core.wpf.images.BitmapSource(Imagicon.super_mono.camera)));
            XpenderItem item1 = new XpenderItem("hi2!", core.wpf.images.BitmapSource(Imagicon.super_mono.headphone));
            item1.OnClick += new EventHandler(item_OnClick);
            gro1.Items.Add(item1);

            exp.XpenderGroup.Add(gro1);

            contentControl2.Content = exp;
            #endregion
        }

        void item0_OnClick(object sender, EventArgs e)
        {
            tabs.AddTab(tabs.XVideoTab(new BlueCore.MediaObject(){Path= @"C:\Users\Likhit\Downloads\[WindSky-Fs] Magi 2 - The Kingdom of Magic - 01 (TBS 1280x720 x264 AAC).mp4"}));

            //throw new NotImplementedException();
        }

        void item_OnClick(object sender, EventArgs e)
        {
            NavBarItem exp = sender as NavBarItem;
            MessageBox.Show(exp.Content.ToString());
            //throw new NotImplementedException();
        }
    }
}
